<h1 id="quickstart" class="title-1">Please quickstart</h1>

<section class="mt4">
  <h2 id="system-requirements" class="title-2">System requirements</h2>

  <p>
    Please supports Linux, macOS and FreeBSD at the moment. The included build
    rules require
    <a
      class="copy-link"
      href="https://www.gnu.org/software/coreutils/"
      target="_blank"
      rel="noopener"
      >core utils</a
    >
    and aim to be portable between recent distributions of these platforms.
  </p>
</section>

<section class="mt4">
  <h2 id="installing" class="title-2">Installing</h2>

  <p><code class="code">curl https://get.please.build | bash</code></p>

  <p>
    This will download and install the latest version of Please on your
    system.<br />
    It also adds itself to your <code class="code">PATH</code>; you may need to
    <code class="code">source ~/.bashrc</code> or
    <code class="code">source ~/.zshrc</code> after install to get that updated.
  </p>

  <p>
    If you're using
    <a class="copy-link" href="https://brew.sh" target="_blank" rel="noopener"
      >Homebrew</a
    >, you can install using that:
  </p>

  <pre class="code-container">
    <!-- prettier-ignore -->
    <code>
    brew tap thought-machine/please
    brew install please
    </code>
  </pre>

  <p>
    Finally, if you'd prefer more manual installation, grab a tarball off
    <a
      class="copy-link"
      href="https://github.com/thought-machine/please/releases"
      target="_blank"
      rel="noopener"
      >our releases page</a
    >
    and extract it yourself; it normally lives in
    <code class="code">~/.please</code> but you can put it where you want.
  </p>

  <p>See <a class="copy-link" href="faq.html#verify">here</a> for information if you'd like to verify
    signatures of the download before running.</p>

  <p>
    When you run <code>plz init</code>, Please will create a
    <code class="code">pleasew</code> script in the
    repository root which can subsequently be used to download and run please.
  </p>
</section>

<section class="mt4">
  <h2 id="shell-completion" class="title-2">Shell completion</h2>

  <p>Please comes with a completion script for Bash and zsh built-in.</p>

  <p>
    You can produce it by running
    <code class="code">plz --completion_script</code>. This is handy to add to
    your <code class="code">.bashrc</code> or <code class="code">.zshrc</code>,
    for example:
  </p>

  <pre class="code-container">
    <!-- prettier-ignore -->
    <code>
    source &lt;(plz --completion_script)
    </code>
  </pre>

  <p>
    The script will complete
    <a class="copy-link" href="/commands.html">subcommands and flags</a>
    but most relevantly can also complete build labels by reading BUILD files
    for you.
  </p>
</section>

<section class="mt4">
  <h2 id="lang-server" class="title-2">
    BUILD file Language Protocol Server
  </h2>

  <p>
    Please ships with a language server for build files. It follows the
    <a
      class="copy-link"
      href="https://langserver.org/"
      target="_blank"
      rel="noopener"
      >language server protocol</a
    >
    from VS Code.
  </p>

  <p>
    To use LPS, simply download the language server protocol plugin for your
    favourite editor, and run the binary with the command
    <code class="code">plz tool lps</code>.
  </p>

  <p>
    Currently LPS supports auto-completion (this works with build labels too!),
    hover, goto definition, diagnostics, signature help, auto-formatting and
    references.
  </p>
</section>

<section class="mt4">
  <h2 id="getting-started" class="title-2">Getting started</h2>

  <p>
    Run <code class="code">plz init</code> at the root of your repo to create
    the .plzconfig file. There are many options that can be configured in this
    file but you can worry about them later - the defaults should be fine to
    begin with.
  </p>

<p>
    Once you have your .plzconfig, you can run <code class="code">plz init plugin [plugin]</code> which will pull in a
    plugin for you with language-specific build rules. See <a class="copy-link" href="/plugins.html">plugins</a> for
    more information on how to do this and what plugins are available.
</p>
</section>

<section class="mt4">
  <h2 id="more-info" class="title-2">More info</h2>

  <p>
    If you want more information on Please, you can raise issues on
    <a
      class="copy-link"
      href="https://github.com/thought-machine/please"
      target="_blank"
      rel="noopener"
      >Github</a
    >
    or catch us on
    <a
      class="copy-link"
      href="https://gitter.im/please-build/Lobby"
      target="_blank"
      rel="noopener"
      >Gitter</a
    >
    to ask questions.
  </p>
</section>

<div class="pagination">
  <div class="pagination__next">
    <a class="copy-link" href="/codelabs.html">Codelabs</a>
  </div>
</div>
